package com.example.timeline.checktype;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.example.timeline.R;
import com.example.timeline.recycleAdapter.CommonAdapter;

/**
 * Created by Administrator on 2017/8/7 0007.
 */

public class TypeThreeHandler  implements CommonAdapter.DataHandler<CheckDataItem>  {
    private final int viewType = 102;
    @Override
    public View getView(Context context, int viewType) {
        if(this.viewType != viewType){
            return null;
        }
        return View.inflate(context, R.layout.view_three,null);
    }

    @Override
    public int getItemViewType(CheckDataItem item) {
        if(item.type.equals("three")){
            return viewType;
        }
        return CommonAdapter.NOT_MATCH_TYPE;
    }

    @Override
    public boolean onBindViewHolder(int viewType,CommonAdapter.MyViewHolder holder, CheckDataItem item) {
        if(this.viewType != viewType){
            return false;
        }
        return true;
    }
}
